package com.th.supcom.pds.impl.service.adapter;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.th.supcom.framework.commoms.uitls.FcXStreamUtil;
import com.th.supcom.pds.domain.vo.Med;
import com.th.supcom.pds.domain.vo.PrescInfoIRON;
import com.th.supcom.pds.external.api.IRONMidCom;
import com.th.supcom.pds.external.api.PdsPackDrugWebService;
import com.th.supcom.pds.impl.common.PdsConstants;
import com.th.supcom.pds.impl.common.utils.ServerUitls;

/**
 * 门诊西药房包药机接口
 * 
 * @author 杨冲
 */
public class PdsPackDrugWebServiceImpl implements PdsPackDrugWebService
{

    @Override
    public String getPres (List <Med> prescList)
    {
        s_LOGGER.info ("调用getPres (List <Med> prescList = 【{}】", new Object[]
        { prescList });
        IRONMidCom ironMidCom = (IRONMidCom) ServerUitls.getWebService (IRONMidCom.class, PdsConstants.IRON_ADDRESS);
        String xmlPresInfo = FcXStreamUtil.objectToString (prescList);
        return ironMidCom.getPres (ServerUitls.convertXMLRoot (xmlPresInfo, PdsConstants.IRON_XML_LIST_ROOT));
    }

    @Override
    public String getPresStatus (PrescInfoIRON prescInfoIRON)
    {
        s_LOGGER.info ("调用getPresStatus (PrescInfoIRON prescInfoIRON = 【{}】", new Object[]
        { prescInfoIRON });
        /*
         * IRONMidCom ironMidCom = (IRONMidCom) ServerUitls.getWebService
         * (IRONMidCom.class, PdsConstants.IRON_ADRESS); String xmlPresInfo =
         * FcXStreamUtil.objectToString (prescInfoIRON);
         */
        return null;
    }

    /** 日志记录器. */
    private static final Logger s_LOGGER = LoggerFactory.getLogger (PdsPackDrugWebServiceImpl.class);

    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";
}
